﻿<Page x:Class="Informator.Presentation.Vesti.pgVesti"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      xmlns:b="clr-namespace:Informator.Presentation.Common"
      Title="pgVesti" d:DesignHeight="721.568" d:DesignWidth="1200.568" Foreground="{x:Null}"  >

    <Page.Resources>

        <!-- All the following is required to Re-Style the ScrollViewer, see 
             http://msdn2.microsoft.com/en-us/library/aa970847(VS.85).aspx
             http://msdn2.microsoft.com/en-us/library/ms742173(VS.85).aspx
             for the default Stles that the ScrollViewer has out of the box
         -->

        <!-- Brushes used in Styling of ScrollViewer -->
        <SolidColorBrush x:Key="StandardBorderBrush" Color="#2C3F4E" />
        <SolidColorBrush x:Key="StandardBackgroundBrush" Color="#2C3F4E" />
        <SolidColorBrush x:Key="HoverBorderBrush" Color="#2C3F4E" />
        <SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#2C3F4E" />
        <SolidColorBrush x:Key="SelectedForegroundBrush" Color="#2C3F4E" />
        <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#2C3F4E" />
        <SolidColorBrush x:Key="NormalBrush" Color="#2C3F4E" />
        <SolidColorBrush x:Key="NormalBorderBrush" Color="#2C3F4E" />
        <SolidColorBrush x:Key="HorizontalNormalBrush" Color="#2C3F4E" />
        <SolidColorBrush x:Key="HorizontalNormalBorderBrush" Color="#2C3F4E" />
        <LinearGradientBrush x:Key="ListBoxBackgroundBrush" 
			StartPoint="0,0" EndPoint="1,0.001">
     
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="StandardBrush" 
			StartPoint="0,0" EndPoint="0,1">
            
        </LinearGradientBrush>
        <SolidColorBrush x:Key="GlyphBrush" Color="Transparent" />
        <LinearGradientBrush x:Key="PressedBrush" 
			StartPoint="0,0" EndPoint="0,1">
            
        </LinearGradientBrush>

        <!-- SrollViewer ScrollBar Repeat Buttons (at each end) -->
        <Style x:Key="ScrollBarLineButton" TargetType="{x:Type RepeatButton}">
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="Template" >
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <Border 
          Name="Border"
          Margin="0" 
          CornerRadius="0" 
          Background="#2C3F4E"
          BorderBrush="#2C3F4E"
          BorderThickness="0">
                            <Path 
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Fill="{StaticResource GlyphBrush}"
            Data="{Binding Path=Content,
				RelativeSource={RelativeSource TemplatedParent}}" />
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsPressed" Value="true">
                                <Setter TargetName="Border" Property="Background" 
								Value="{StaticResource PressedBrush}" />
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" 
								Value="{StaticResource DisabledForegroundBrush}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Foreground" Value="{x:Null}"/>
        </Style>
        <!-- SrollViewer ScrollBar Repeat Buttons (The part in the middle, 
             not the thumb the long area between the buttons ) -->
        <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <Border Background="Transparent" /> 
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <!-- ScrollViewer ScrollBar Thumb, that part that can be dragged
            up/down or left/right Buttons -->
        <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Border 
          CornerRadius="3" 
          Background="AliceBlue"
          BorderBrush="#FF0C558F"
          BorderThickness="1" Width="10"
                           />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <ControlTemplate x:Key="VerticalScrollBar" 
			TargetType="{x:Type ScrollBar}">
            <Grid >
                <Grid.RowDefinitions>
                    <RowDefinition MaxHeight="18"/>
                    <RowDefinition Height="0.00001*"/>
                    <RowDefinition MaxHeight="18"/>
                </Grid.RowDefinitions>
                <Border
      Grid.RowSpan="3"
      CornerRadius="2" 
      Background="#2C3F4E" />
                <RepeatButton 
      Grid.Row="0"                           
      Style="{StaticResource ScrollBarLineButton}"
      Height="18"
      Command="ScrollBar.LineUpCommand"
      Content="M 0 4 L 8 4 L 4 0 Z" />
                <Track 
      Name="PART_Track"
      Grid.Row="1"
      IsDirectionReversed="true">
                    <Track.DecreaseRepeatButton>
                        <RepeatButton 
          Style="{StaticResource ScrollBarPageButton}"
          Command="ScrollBar.PageUpCommand" />
                    </Track.DecreaseRepeatButton>
                    <Track.Thumb>
                        <Thumb 
          Style="{StaticResource ScrollBarThumb}" 
          Margin="1,0,1,0"  
          Background="{StaticResource HorizontalNormalBrush}"
          BorderBrush="{StaticResource HorizontalNormalBorderBrush}" />
                    </Track.Thumb>
                    <Track.IncreaseRepeatButton>
                        <RepeatButton 
          Style="{StaticResource ScrollBarPageButton}"
          Command="ScrollBar.PageDownCommand" />
                    </Track.IncreaseRepeatButton>
                </Track>
                <RepeatButton 
      Grid.Row="3" 
      Style="{StaticResource ScrollBarLineButton}"
      Height="18"
      Command="ScrollBar.LineDownCommand"
      Content="M 0 0 L 4 4 L 8 0 Z"/>
            </Grid>
        </ControlTemplate>
        <!-- HorizontalScrollBar Template using the previously created Templates -->
        <ControlTemplate x:Key="HorizontalScrollBar" 
			TargetType="{x:Type ScrollBar}">
            <Grid >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MaxWidth="18"/>
                    <ColumnDefinition Width="0.00001*"/>
                    <ColumnDefinition MaxWidth="18"/>
                </Grid.ColumnDefinitions>
                <Border
      Grid.ColumnSpan="3"
      CornerRadius="2" 
      Background="{x:Null}" />
                <RepeatButton 
      Grid.Column="0"                           
      Style="{StaticResource ScrollBarLineButton}"
      Width="18"
      Command="ScrollBar.LineLeftCommand"
      Content="M 4 0 L 4 8 L 0 4 Z" />
                <Track 
      Name="PART_Track"
      Grid.Column="1"
      IsDirectionReversed="False">
                    <Track.DecreaseRepeatButton>
                        <RepeatButton 
          Style="{StaticResource ScrollBarPageButton}"
          Command="ScrollBar.PageLeftCommand" />
                    </Track.DecreaseRepeatButton>
                    <Track.Thumb>
                        <Thumb 
          Style="{StaticResource ScrollBarThumb}" 
          Margin="0,1,0,1"  
          Background="{StaticResource NormalBrush}"
          BorderBrush="{StaticResource NormalBorderBrush}" />
                    </Track.Thumb>
                    <Track.IncreaseRepeatButton>
                        <RepeatButton 
          Style="{StaticResource ScrollBarPageButton}"
          Command="ScrollBar.PageRightCommand" />
                    </Track.IncreaseRepeatButton>
                </Track>
                <RepeatButton 
      Grid.Column="3" 
      Style="{StaticResource ScrollBarLineButton}"
      Width="18"
      Command="ScrollBar.LineRightCommand"
      Content="M 0 0 L 4 4 L 0 8 Z"/>
            </Grid>
        </ControlTemplate>
        <!-- Style for overall  ScrollBar -->
        <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Style.Triggers>
                <Trigger Property="Orientation" Value="Horizontal">
                    <Setter Property="Width" Value="Auto"/>
                    <Setter Property="Height" Value="18" />
                    <Setter Property="Template" 
						Value="{StaticResource HorizontalScrollBar}" />
                </Trigger>
                <Trigger Property="Orientation" Value="Vertical">
                    <Setter Property="Width" Value="18"/>
                    <Setter Property="Height" Value="Auto" />
                    <Setter Property="Template" 
						Value="{StaticResource VerticalScrollBar}" />
                </Trigger>
            </Style.Triggers>
        </Style>

        <!-- Style for overall  ScrollViewer -->
        <Style x:Key="FavsScrollViewer" TargetType="{x:Type ScrollViewer}">
            <Setter Property="OverridesDefaultStyle" Value="True"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ScrollViewer}">
                        <Grid HorizontalAlignment="Right">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>

                            <ScrollContentPresenter Grid.Column="1"/>

                            <ScrollBar Name="PART_VerticalScrollBar"
            Value="{TemplateBinding VerticalOffset}"
            Maximum="{TemplateBinding ScrollableHeight}"
            ViewportSize="{TemplateBinding ViewportHeight}"
            Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
                            <ScrollBar Name="PART_HorizontalScrollBar"
            Orientation="Horizontal"
            Grid.Row="1"
            Grid.Column="1"
            Value="{TemplateBinding HorizontalOffset}"
            Maximum="{TemplateBinding ScrollableWidth}"
            ViewportSize="{TemplateBinding ViewportWidth}"
            Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>

                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </Page.Resources>





    <Grid>

        <Grid x:Name="Body" >
            <Grid x:Name="Heder" VerticalAlignment="Top" HorizontalAlignment="Stretch"  Height="144" Margin="0,10,0,0">
                <Grid.ColumnDefinitions>

                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="548*"/>

                </Grid.ColumnDefinitions>

                <Image HorizontalAlignment="Left" Height="100" VerticalAlignment="Top" Width="100" Source="/Informator;component/Resources/nastava.png" Grid.ColumnSpan="2" Margin="10,10,0,0" />
                <Label Grid.Column="2" Content="Vesti" Foreground="white" FontSize="30" VerticalAlignment="top" HorizontalAlignment="Left" Height="45" Width="auto" Margin="10,10,0,0"/>
                <Label Grid.Column="2" Content="clock" x:Name="lblClock" Foreground="white" FontSize="30" VerticalAlignment="top" HorizontalAlignment="Right" Height="57" Width="auto" Margin="0,10,10,0" />
                <Label Grid.Column="2" Content="Вести Високе школе електротехнике и рачунарства" x:Name="lblNaslov"  Foreground="white" FontSize="40" VerticalAlignment="Bottom" HorizontalAlignment="Center" Height="70" />

                <Label Grid.Column="2" x:Name="lblGodina"  x:FieldModifier="public" Foreground="white" FontSize="30" VerticalAlignment="top" HorizontalAlignment="Right" Height="57" Width="auto" />
                <Border BorderBrush="White" BorderThickness="0,0,0,1" HorizontalAlignment="Stretch" Height="30" Width="auto" Margin="0,110,0,0" VerticalAlignment="Top"  Grid.ColumnSpan="3"/>
            </Grid>
        </Grid>
        <Grid Name="content">
                <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
         
                </Grid.ColumnDefinitions>
            <Label Content="Aktuelne vesti" FontSize="35" Foreground="white" HorizontalAlignment="Left" VerticalAlignment="Top"  Margin="95,150,46,140"/>

            <ScrollViewer  Name="scscroll" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Visible"  Height="auto" Margin="95,220,116,150" >
                <Border BorderBrush="White" BorderThickness="0,0,0,0">
                    <Grid Grid.Column="0" Name="aktuelne" Margin="0,0,10,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="40"/>
                        
                    </Grid.RowDefinitions>

                </Grid>
                    </Border>
            </ScrollViewer>

            <Grid Grid.Column="1" Name="Izabranenaslov" HorizontalAlignment="Stretch"  VerticalAlignment="Stretch"  Margin="0,150,95,95" >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="50"/>
                    <RowDefinition Height="300"/>
                    <RowDefinition Height="40"/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
                    <Label Grid.Row="0" Content="Izabrane vesti" FontSize="35" Foreground="white" HorizontalAlignment="Left" />
                    
               
                <Grid Grid.Row="1" Name="izabrane" Margin="0,20,10,0"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
                    <ScrollViewer>
                    <Grid Name="btnChildren" HorizontalAlignment="Left" VerticalAlignment="Stretch"  Opacity="0.9"  Margin="10,0,0,0" >
                        <Grid.RowDefinitions>
                            <RowDefinition Height="auto"/>
                            <RowDefinition Height="auto"/>
                            <RowDefinition Height="auto"/>
                            <RowDefinition Height="auto"/>
                            </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                           
                        </Grid.ColumnDefinitions>
                            <TextBlock Grid.Row="0" Grid.Column="0" x:Name="NaslovV" Height="auto"  FontSize="30" VerticalAlignment="Stretch" HorizontalAlignment="Left" TextWrapping="Wrap"  Opacity="1" Foreground="Azure"  Width="700"  Background="{x:Null}" > Tekst</TextBlock>
                            <TextBlock Grid.Row="1" Grid.Column="0" x:Name="predmet"  FontSize="22"  Opacity="1" VerticalAlignment="Top"   HorizontalAlignment="Left" Foreground="LightBlue" Margin="0,10,0,10" >Tekst</TextBlock>
                            <Label Grid.Row="3"  Grid.Column="0" x:Name="DatumV" Content="Datum" FontSize="16" Width="auto"  VerticalAlignment="Bottom" HorizontalContentAlignment="Left" HorizontalAlignment="Left"  Opacity="1" Foreground="Coral"    VerticalContentAlignment="Bottom" Background="{x:Null}"  />
                            <Border BorderBrush="White" BorderThickness="1" Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="top"  />

                                <TextBlock Grid.Row="2" TextAlignment="Justify" Grid.ColumnSpan="2" Grid.Column="0" x:Name="TekstV"  FontSize="20"  Opacity="1" VerticalAlignment="Top"  Foreground="white" HorizontalAlignment="Left"  Width="700" TextWrapping="Wrap" Margin="0,10,0,10" >Tekst</TextBlock>


                    </Grid>
               </ScrollViewer> 
                    
                </Grid>
               
                <Grid x:Name="desetka" Grid.Row="3">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="auto"/>
                    </Grid.RowDefinitions>
                    <Label Grid.Row="0" Content="Televizija 10ka" FontSize="36" Foreground="white" VerticalAlignment="Stretch" Height="auto" HorizontalAlignment="Left" />
                    
                </Grid>
            </Grid>
            </Grid>
        <Grid Name="Futer" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Height="auto" Margin="0,0,5,0">
            <Border BorderBrush="White" BorderThickness="0,0,0,1" HorizontalAlignment="Stretch"  Width="auto"  VerticalAlignment="top"/>
            <Button Name="btnNazad" Grid.Column="0" VerticalAlignment="Bottom"  HorizontalAlignment="Left" Width="100" Foreground="White" Background="#FF2D3E4E" Margin="30,20,0,20" BorderThickness="0" BorderBrush="White" FontSize="30" >
                <Image Source="/Informator;component/Resources/appbar.arrow.left.png"  ></Image>
            </Button>
            <Canvas x:Name="canvas2" Height="100" Width="100" Visibility="Collapsed">
                <Canvas Height="100" Width="100" x:Name="canvas1" RenderTransformOrigin=".5,.5">
                    <!--<Canvas.RenderTransform>
                        <RotateTransform x:Name="spin" Angle="0"/>
                    </Canvas.RenderTransform>-->
                </Canvas>
                <Label Name="lblLoading"  Height="23" Foreground="White" Canvas.Left="26" Canvas.Top="36" Width="48">Loading</Label>
            </Canvas>
        </Grid>
    </Grid>
    
</Page>
